package com.example.blog;

import java.util.Stack;

public class test1 {
    public static void main(String[] args) {
        String S = "42";
        char[] arr = S.toCharArray();
        Stack<Integer> s = new Stack<>();
        int num = 0;
        int n = 0;
        for (char c : arr) {
            if (c != 32) {
                if (c >= '0' && c <= '9') {
                    num = num * 10 + (c - 48);
                }
                else if(c == '+'){
                    s.push(num);
                    num = 0;
                }
                else if(c=='-'){
                    s.push(-num);
                    num = 0;
                }
                else if(c == '*'){

                }


            }


        }
    }
}
